package com.sdonkey.score.bean;

import com.alibaba.fastjson.JSONObject;
import com.sdonkey.score.util.ResponseUtil;

/**
 * Created by hujun on 2018\12\19 0019.
 */
public class AddAdPlaceGift {
    private Integer id;
    private String adId;
    private Integer trueAdId;
    private String giftLowerLimit;
    private String giftUpperLimit;
    private Integer status;
    private Integer giftRatio;
    private Integer userId;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getAdId() {
        return adId;
    }

    public void setAdId(String adId) {
        this.adId = adId;
    }

    public Integer getTrueAdId() {
        return trueAdId;
    }

    public void setTrueAdId(Integer trueAdId) {
        this.trueAdId = trueAdId;
    }

    public String getGiftLowerLimit() {
        return giftLowerLimit;
    }

    public void setGiftLowerLimit(String giftLowerLimit) {
        this.giftLowerLimit = giftLowerLimit;
    }

    public String getGiftUpperLimit() {
        return giftUpperLimit;
    }

    public void setGiftUpperLimit(String giftUpperLimit) {
        this.giftUpperLimit = giftUpperLimit;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getGiftRatio() {
        return giftRatio;
    }

    public void setGiftRatio(Integer giftRatio) {
        this.giftRatio = giftRatio;
    }

    @Override
    public String toString() {
        return "AddAdPlaceGift{" +
                "id=" + id +
                ", adId='" + adId + '\'' +
                ", trueAdId=" + trueAdId +
                ", giftLowerLimit='" + giftLowerLimit + '\'' +
                ", giftUpperLimit='" + giftUpperLimit + '\'' +
                ", status=" + status +
                ", giftRatio=" + giftRatio +
                ", userId=" + userId +
                '}';
    }

    public JSONObject check() {
        JSONObject error = new JSONObject();
        if (id == null) {
            if (adId == null || giftLowerLimit == null || giftUpperLimit == null) {
                error.put("code", "ERROR_PARAM");
                error.put("msg", "参数错误");
            }
        }

        return null;

    }
}
